Cuck WickAcknowledgement
This indicator is dedicated to my friend Alexandru who saved me from one of these scam cuck wicks which almost liquidated me.
Alexandru is one of the best scalpers out there and he always nails his entries at the tip of these wicks.
This inspired me to create this indicator.
What's a cuck wick?
It's that fast stop-hunting wick that cucks everyone by triggering their stop-loss and liquidation.
Liquidity is the lifeblood of stock market and liquidation is the process that moves price.
This indicator will identify when a liquidity pool is getting raided to trigger buy or sell stops, they are also know as stop-hunts.
How does it work?
When market consolidates in one direction, it builds up liquidity zones.
Market maker will break out of these consolidation phases by having dramatic price action to either pump or dump to raid these liquidity zones.
This is also called stop-hunts or liquidity raids. After that it will start reversing back to the opposite direction.
This is most noticeable by the length of the wick of a given candle in a very short amount of time and the total size of the candle.
This indicator highlights them accordingly.
Settings
Wick and Candle ratio works with default values but finetune will enhance user experience and usability.
Wick Ratio: Size of the wick compared to body of a candle.
Adjust this to higher ratio on smaller timeframe or smaller ratio on bigger timeframe to your trading style to spot a trend reversal.
Candle Ratio: The size of the candle, by default it is 0.75% of the current price.
For example, if BTC is at 20,000 then the size of the candle has to be minimum 150.
This can be fine tuned to bigger candle size on higher time frames or smaller for shorter timeframe depending on the trade type.
How to use it?
This indicator will identify when a liquidity pool is getting raided to trigger buy or sell stops, they are also know as stop-hunts. It can be used of its own for scalping but there are also a good few indicators which would most definitely help to confluence bigger timeframe trades.
Scalp
This indicator shows the most chaotic moments in price action; therefore it works best on smaller timeframes, ideally 3 or 5 minute candle.
- Wait for the market to start pumping or dumping.
- Current candle will change colour (Bullish/Bearish).
- Enter trade as soon as price starts to reverse back.
- Place the stop-loss outside of the current candle.
- Wait for the cuck wick to appear as confirmation.
Price is very chaotic during a liquidity stop-hunt raid but there is a saying:
"In the midst of chaos, there is also opportunity" - Sun-Tzu
Since this is a very high risk, high reward strategy; it is advised to practice on paper trade first.
Practice until perfection and this indicator would be the perfect bread and butter scalp confirmation.
Fair Value Gap
FVG strategy is the most accurate in conjunction with this indicator.
Normally price would reverse after consuming fair value gaps but often it's difficult to know when and where.
This indicator would identify those crucial entry points for reverse course direction of the price action.
Support and Resistance
This indicator can also be used in conjunction with support and resistance lines.
Generally the cuck will go deep below the support or spike much further up the resistance lines to liquidate positions.
Bollinger Bands
Bolling Bands strategy would be to wait until the price breaks out of the band.
Once the wick is formed, it would be an ideal entry point.
Script change
This is an open-source script and feel free to modify according to your need and to amplify your existing strategy.
Recherche dans les scripts pour "fair value gap"
Quasimodo PatternWhat is a Quasimodo Pattern?
A Quasimodo Pattern is a chart pattern traders look for to predict possible price reversals in the market:
- Bullish Quasimodo: Signals a possible price increase (buying opportunity).
- Bearish Quasimodo: Signals a potential price decrease (selling opportunity).
How the Script Works
1. Bullish Quasimodo:
- Checks if the price pattern shows signs of a potential upward movement:
- The current low price is higher than a previous price point (suggesting fair value gap).
- The previous candle closed higher than it opened (bullish candle).
- The candle before that closed lower than it opened (bearish candle).
2. Bearish Quasimodo:
- Looks for signs of a downward movement:
- The current high price is lower than a previous price point (suggesting fair value gap).
- The previous candle closed lower than it opened (bearish candle).
- The candle before that closed higher than it opened (bullish candle).
Visual Indicators
- Yellow Candles: Indicate a bullish Quasimodo pattern.
- Pink Candles: Indicate a bearish Quasimodo pattern.
Alerts
If a Quasimodo pattern is detected, the script sends an alert:
- The alert says: "A Quasimodo Pattern has appeared!"
Purpose
Traders can use this tool to quickly spot potential trend changes without manually analyzing every chart, saving time and improving decision-making for trades.
ICT Judas Swing | Flux Charts💎 GENERAL OVERVIEW
Introducing our new ICT Judas Swing Indicator! This indicator is built around the ICT's "Judas Swing" strategy. The strategy looks for a liquidity grab around NY 9:30 session and a Fair Value Gap for entry confirmation. For more information about the process, check the "HOW DOES IT WORK" section.
Features of the new ICT Judas Swing :
Implementation of ICT's Judas Swing Strategy
2 Different TP / SL Methods
Customizable Execution Settings
Customizable Backtesting Dashboard
Alerts for Buy, Sell, TP & SL Signals
📌 HOW DOES IT WORK ?
The strategy begins by identifying the New York session from 9:30 to 9:45 and marking recent liquidity zones. These liquidity zones are determined by locating high and low pivot points: buyside liquidity zones are identified using high pivots that haven't been invalidated, while sellside liquidity zones are found using low pivots. A break of either buyside or sellside liquidity must occur during the 9:30-9:45 session, which is interpreted as a liquidity grab by smart money. The strategy assumes that after this liquidity grab, the price will reverse and move in the opposite direction. For entry confirmation, a fair value gap (FVG) in the opposite direction of the liquidity grab is required. A buyside liquidity grab calls for a bearish FVG, while a sellside grab requires a bullish FVG. Based on the type of FVG—bullish for buys and bearish for sells—the indicator will then generate a Buy or Sell signal.
After the Buy or Sell signal, the indicator immediately draws the take-profit (TP) and stop-loss (SL) targets. The indicator has three different TP & SL modes, explained in the "Settings" section of this write-up.
You can set up alerts for entry and TP & SL signals, and also check the current performance of the indicator and adjust the settings accordingly to the current ticker using the backtesting dashboard.
🚩 UNIQUENESS
This indicator is an all-in-one suit for the ICT's Judas Swing concept. It's capable of plotting the strategy, giving signals, a backtesting dashboard and alerts feature. Different and customizable algorithm modes will help the trader fine-tune the indicator for the asset they are currently trading. Three different TP / SL modes are available to suit your needs. The backtesting dashboard allows you to see how your settings perform in the current ticker. You can also set up alerts to get informed when the strategy is executable for different tickers.
⚙️ SETTINGS
1. General Configuration
Swing Length -> The swing length for pivot detection. Higher settings will result in
FVG Detection Sensitivity -> You may select between Low, Normal, High or Extreme FVG detection sensitivity. This will essentially determine the size of the spotted FVGs, with lower sensitivies resulting in spotting bigger FVGs, and higher sensitivies resulting in spotting all sizes of FVGs.
2. TP / SL
TP / SL Method ->
a) Dynamic: The TP / SL zones will be auto-determined by the algorithm based on the Average True Range (ATR) of the current ticker.
b) Fixed : You can adjust the exact TP / SL ratios from the settings below.
Dynamic Risk -> The risk you're willing to take if "Dynamic" TP / SL Method is selected. Higher risk usually means a better winrate at the cost of losing more if the strategy fails. This setting is has a crucial effect on the performance of the indicator, as different tickers may have different volatility so the indicator may have increased performance when this setting is correctly adjusted.
Premium Imbalance FinderIntroducing the Premium Imbalances Indicator, a powerful tool designed help traders identify and analyze market imbalances. This advanced indicator offers a comprehensive suite of features to enhance your trading experience and provide valuable insights into market dynamics.
Key Features:
Fair Value Gap (FVG): Identify price ranges where the market has not achieved fair value, indicating potential imbalances and trading opportunities.
Balanced Price Range (BPR): Visualize price ranges where the market has found a balance between supply and demand.
Volume Imbalance: Detect areas of significant volume imbalance, highlighting the absence of body volume and potential market inefficiencies.
Opening Gap: Identify un-offered price ranges at the opening of a trading session, providing insights into potential market direction.
Customizable Display: Adjust the display limit to control the number of imbalance boxes visible on the chart, ensuring a clutter-free and focused view.
Mitigation Analysis: Set a mitigation level to determine when an imbalance has been mitigated and track the percentage of mitigation for each imbalance.
Higher Timeframe Analysis: Enable the HTF Imbalance feature to analyze imbalances on higher timeframes, providing a broader perspective on market structure.
Customizable Appearance: Personalize the colors of imbalance boxes, premium zones, and mid-lines to suit your visual preferences and easily distinguish between bullish and bearish imbalances.
Flexible Imbalance Extension: Choose between custom, current, or extended imbalance box display to adapt to your trading style and analysis requirements.
Detailed Tooltips: Hover over imbalance labels to view the percentage of mitigation for each imbalance, providing quick and easy access to crucial information.
The Premium Imbalances Indicator is suitable for traders of all levels, from beginners to experienced professionals, and can be used across various markets and timeframes.
By utilizing this powerful tool, traders can gain a deeper understanding of market dynamics, identify potential trading opportunities, and make more informed decisions based on the analysis of imbalances. The indicator's customizable features and detailed insights make it an essential addition to any trader's toolkit.
HTF FVG and Wick Fill trackingImbalances in the charts are some of the clearest and most traded price areas. Two of the best and most used are fair value gaps FVGs and large candle wicks. In both of these price appears to move in such a way that most are left behind having 'missed' the move. But in reality price will often come back to these price points to re-balance and absorb the liquidity that was left behind.
This indicator takes these areas and makes viewing and tracking them clearer than ever. It does this, by first allowing the user to overlay a higher timeframe candle on the current chart. This in itself provides an in depth look at a higher timeframe candle both as it forms and in its final form.
Next the indicator identifies either the FVG or large wicks, on the chosen higher timeframe, all while the chart remains on a lower timeframe. As seen here the fair value gaps are clearly highlighted, taken from a 4 hour timeframe, while the actual chart is on 15 minutes. This allows the user even greater accuracy in identifying their key trading areas.
Utilizing the indicators unique feature, these areas can optionally be extended forward to the current timeframe and 'filled' in realtime. Areas that are filled to the users defined level, will be removed from the chart.
With supplementary settings for how much history to show, how large of a wick should be highlighted and complete control over the colour scheme, users will be able to track and understand the filling of imbalances like never before.
ICT Silver Bullet [LuxAlgo]The ICT Silver Bullet indicator is inspired from the lectures of "The Inner Circle Trader" (ICT) and highlights the Silver Bullet (SB) window which is a specific 1-hour interval where a Fair Value Gap (FVG) pattern can be formed.
When a FVG is formed during the Silver Bullet window, Support & Resistance lines will be drawn at the end of the SB session.
There are 3 different Silver Bullet windows (New York local time):
The London Open Silver Bullet (3 AM — 4 AM ~ 03:00 — 04:00)
The AM Session Silver Bullet (10 AM — 11 AM ~ 10:00 — 11:00)
The PM Session Silver Bullet (2 PM — 3 PM ~ 14:00 — 15:00)
🔶 USAGE
The ICT Silver Bullet indicator aims to provide users a comprehensive display as similar as possible to how anyone would manually draw the concept on their charts.
It's important to use anything below the 15-minute timeframe to ensure proper setups can display. In this section, we are purely using the 3-minute timeframe.
In the image below, we can see a bullish setup whereas a FVG was successfully retested during the Silver Bullet session. This was then followed by a move upwards to liquidity as our target.
Alternatively, you can also see below a bearish setup utilizing the ICT Silver Bullet indicator outlined.
At this moment, the indicator has removed all other FVGs within the Silver Bullet session & has confirmed this FVG as the retested one.
There is also a support level marked below to be used as a liquidity target as per the ICT Silver Bullet concept suggests.
In the below chart we can see 4 separate consecutive examples of bullish & bearish setups on the 3-minute chart.
🔶 CONCEPTS
This technique can visualize potential support/resistance lines, which can be used as targets.
The script contains 2 main components:
• forming of a Fair Value Gap (FVG)
• drawing support/resistance (S/R) lines
🔹 Forming of FVG
1 basic principle: when a FVG at the end of the SB session is not retraced, it will be made invisible.
Dependable on the settings, different FVG's will be shown.
• 'All FVG': all FVG's are shown, regardless the trend
• 'Only FVG's in the same direction of trend': Only FVG's are shown that are similar to the trend at that moment (trend can be visualized by enabling ' Show ' -> ' Trend ')
-> only bearish FVG when the trend is bearish vs. bullish FVG when trend is bullish
• 'strict': Besides being similar to the trend, only FVG's are shown when the closing price at the end of the SB session is:
– below the top of the FVG box (bearish FVG)
– above bottom of the FVG box (bullish FVG)
• 'super-strict': Besides being similar to the trend, only FVG's are shown when the FVG box is NOT broken
in the opposite direction AND the closing price at the end of the SB session is:
– below bottom of the FVG box (bearish FVG)
– above the top of the FVG box (bullish FVG)
' Super-Strict ' mode resembles ICT lectures the most.
🔹 Drawing support/resistance lines
When the SB session has ended, the script draws potential support/resistance lines, again, dependable on the settings.
• Previous session (any): S/R lines are fetched between current and previous session.
For example, when current session is ' AM SB Session (10 AM — 11 AM) ', then previous session is
' London Open SB (3 AM — 4 AM) ', S/R lines between these 2 sessions alone will be included.
• Previous session (similar): S/R lines are fetched between current and previous - similar - session.
For example, when current session is ' London Open SB (3 AM — 4 AM)' , only S/R lines between
current session and previous ' London Open SB (3 AM — 4 AM) ' session are included.
When a new session starts, S/R lines will be removed, except when enabling ' Keep lines (only in strict mode) '
This is not possible in ' All FVG ' or ' Only FVG's in the same direction of trend ' mode, since the chart would be cluttered.
Note that in ' All FVG ' or ' Only FVG's in the same direction of trend ' mode, both, Support/Resistance lines will be shown,
while in Strict/Super-Strict mode:
• only Support lines will be shown if a bearish FVG appears
• only Resistance lines if a bullish FVG is shown
The lines will still be drawn the the end of the SB session, when a valid FVG appears,
but the S/R lines will remain visible and keep being updated until price reaches that line.
This publication contains a "Minimum Trade Framework (mTFW)", which represents the best-case expected price delivery, this is not your actual trade entry - exit range.
• 40 ticks for index futures or indices
• 15 pips for Forex pairs.
When on ' Strict/Super-Strict ' mode, only S/R lines will be shown which are:
• higher than the lowest FVG bottom + mTFW, in a bullish scenario
• lower than the highest FVG bottom - mTFW, in a bearish scenario
When on ' All FVG/Only FVG's in the same direction of trend ' mode, or on non-Forex/Futures/Indices symbols, S/R needs to be higher/lower than SB session high/low.
🔶 SETTINGS
(Check CONCEPTS for deeper insights and explanation)
🔹 Swing settings (left): Sets the length, which will set the lookback period/sensitivity of the Zigzag patterns (which directs the trend)
🔹 Silver Bullet Session; Show SB session: show lines and labels of SB session
Labels can be disabled separately in the ' Style ' section, color is set at the ' Inputs ' section.
🔹 FVG
– Mode
• All FVG
• Only FVG's in the same direction of trend
• Strict
• Super-Strict
– Colors
– Extend: extend till last bar of SB session
🔹 Targets – support/resistance lines
– Previous session (any): S/R lines fetched between current and previous SB session
– Previous session (similar): S/R lines fetched between current and previous similar SB session
– Colors
– Keep lines (only in strict mode)
🔹 Show
– MSS ~ Session: Show Market Structure Shift , only when this happens during a SB session
– Trend: Show trend (Zigzag, colored ~ trend)
Liquidity Engulfing & Displacement [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
*This indicator is based on upslidedown's "Liquidity Engulfing Candles ". It's a very cool indicator. thank you.
It has 2 functions: show the Liquidity Engulfing on HTF and candle color change when displacement occurs.
=== Function description ===
1. Liquidity Engulfing on HTF
This indicator gives Liquidity Engulfing signals not only for the current candle, but also for H4 and H1 on HTF.
You can use that a bullish engulfing on H1 is a BOS on m5 and on H4 is a BOS on m15. It uses the theory of stop hunt from ICT.
Also, It's possible to fire alert.
2. Displacement
Change the color display of the candlesticks when a bullish candleStick or bearish candleStick is attached. Furthermore, by enabling the "Require FVG" option, you can easily discover the FVG (Fair Value Gap). It is a very useful function for ICT trading.
When H1 candle takes liquidity from one side and moves with an explosive move to the other side of the previous candle (displacement), it creates break of market structure on M5. Entry on discount FVG or OTE with stop loss at or below the stop hunt wick.
=== Parameter description ===
- Liquidity engulfing candles(LEC) SETTING
- Show H1 LEC … Whether to show LEC for H1
- Show H4 LEC … Whether to show LEC for H4
- Show Current LEC … Whether to show LEC for current timeframe
- Apply Stop Hunt Wick Filter … Require candle wick into prior candle retracement zone
- Apply Close Filter … Require LL/HH on candle in order to print a valid engulfing signal
- DISPLACEMENT SETTING
- Require FVG … Draw only when FVG occurs
- Displacement Type … Displacement from open to close? or from high to low?
- Displacement Length … Period over which to calculate the standard deviation
- Displacement Strength … The larger the number, the stronger the displacement detected
-------------------------
2つの機能があります: 上位足のLiquidity engulfing(流動性獲得)を表示することと、大きな変位が発生したときにローソク足の色を変更することです。
=== 機能説明 ===
1. 上位足のLiquidity engulfing
このインジケーターは、現在のローソク足だけでなく、上位足の H4 および H1 に対してもLiquidity engulfingシグナルを提供します。
H1はm5、H4はm15での使用を推奨します。これはICTのストップハント理論を活用しています。また、アラートを発することも可能です。
2. 変位(DISPLACEMENT)
大きな陽線、陰線を付けた場合に、そのローソク足をカラー表示を変更します。
さらに"Require FVG"オプションを有効にすることで、FVG(Fair Value Gap)を容易に発見することができます。ICTトレードにを行うにあたり大変有用な機能となっています。
=== パラメータの説明 ===
- Liquidity engulfing candles(LEC) SETTING
- Show H1 LEC … H1のLECを表示するかどうか
- Show H4 LEC … H4のLECを表示するかどうか
- Show Current LEC … 現在の期間の LEC を表示するかどうか
- Apply Stop Hunt Wick Filter … ハラミ足、もしくは包み足になっている場合のみに検知させる
- Apply Close Filter … 1つ前のローソクよりも終値で超えていた場合のみに検知させる
- DISPLACEMENT SETTING
- Require FVG … FVG発生時のみ描画する
- Displacement Type … openからcloseまでの変位か?highからlowまでの変位か?
- Displacement Length … 標準偏差を計算する期間
- Displacement Strength … 変位の強さ(数字が大きいほど強い変位を検出)
ICT HTF Liquidity Levels /w Alert [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
*This indicator is based on sbtnc's "HTF Liquidity Levels". It's a very cool indicator. thank you.
It has 3 functions: visualization of HTF liquidity (with alert), candle color change when displacement occurs, and MSB (market structure break) line display.
=== Function description ===
1. HTF liquidity (with alert)
Lines visualize the liquidity pools on the HTF bars. Alerts can be set for each TF's line.
Once the price reaches the line, the line is repaint.
To put it plainly, the old line disappears and a new line appears. The line that disappeared remains as a purged line. (It is also possible to hide the purged line with a parameter)
The alert will be triggered at the moment the line disappears. An alert will be issued when you touch the HTF's liquid pools where the loss is accumulated, so you can notice the stop hunting with the alert.
This alert is an original feature of this indicator.
The timeframe of the HTF can't modify. You can get Monthly, weekly, daily and H1 and H4.
Each timeframe displays the 3 most recent lines. By narrowing it down to 3, it is devised to make it easier to see visually. (This indicator original)
2. Displacement
Change the color display of the candlesticks when a bullish candle stick or bearish candle stick is attached. Furthermore, by enabling the "Require FVG" option, you can easily discover the FVG (Fair Value Gap). It is a very useful function for ICT trading.
3. MSB (market structure break)
Displays High/Low lines for the period specified by the parameter. It is useful for discovering BoS & CHoCH/MSS, which are important in ICT trading.
=== Parameter description ===
- HTF LIQUIDITY
- Daily … Daily line display settings (color, line width)
- Weekly … Weekly line display settings (color, line width)
- Monthly … Monthly line display settings (color, line width)
- INTRADAY LIQUIDITY
- 1H … 1H line display settings (color, line width)
- 4H … 4H line display settings (color, line width)
- PURGED LIQUIDITY … Display setting of the line once the candle reaches
- Show Purge Daily … Daily purged line display/non-display setting
- Show Purge Weekly … Weekly purged line display/non-display setting
- Show Purge Monthly … Monthly purged line display/non-display setting
- Show Purge 1H … 1H purged line display/non-display setting
- Show Purge 4H … 4H purged line display/non-display setting
- MARKET STRUCTURE BREAK - MBS
- Loopback … Period for searching High/Low
- DISPLACEMENT FOR FVG
- Require FVG … Draw only when FVG occurs
- Displacement Type … Displacement from open to close? or from high to low?
- Displacement Length … Period over which to calculate the standard deviation
- Displacement Strength … The larger the number, the stronger the displacement detected
-------------------------
このインジケータはsbtncさんの"HTF Liquidity Levels"をベースに作成しています。
上位足流動性の可視化(アラート付き)、変位発生時のローソク色変更、MSB(market structure break)ライン表示の3つの機能を有します。
<機能説明>
■上位足流動性の可視化
上位足の流動性の吹き溜まり(ストップが溜まっているところ)をラインで可視化します。ラインにはアラートを設定することが可能です。
一度価格がラインに到達するとそのラインは再描画されます。
平たく言うと、今までのラインが消えて新しいラインが出現する。という事です。
消えたラインはpurgeラインとして残ります。(パラメータでpurgeラインを非表示にすることも可能です)
アラートはラインが消える瞬間に発報します。上位足の損切り溜まってるところにタッチするとアラートを発報するので、アラートにてストップ狩りに気づくことができます。
このアラート発報については本インジケータオリジナルの機能となります。
表示可能な上位足のタイムフレームは固定です。月足、週足、日足およびH1とH4を表示することができます。
各タイムフレーム、直近から3つのラインを表示します。3つに絞ることで視覚的に見やすく工夫しています。(本インジケータオリジナル)
■変位発生時のローソク色変更
大きな陽線、陰線を付けた場合に、そのローソク足をカラー表示を変更します。
さらに"Require FVG"オプションを有効にすることで、FVG(Fair Value Gap)を容易に発見することができます。ICTトレードにを行うにあたり大変有用な機能となっています。
■MSB(market structure break)ライン表示
パラメータで指定した期間のHigh/Lowをライン表示します。ICTトレードで重要視しているBoS & CHoCH/MSSの発見に役立ちます。
<パラメータ説明>
- HTF LIQUIDITY
- Daily … 日足ライン表示設定(色、線幅)
- Weekly … 週足ライン表示設定(色、線幅)
- Monthly … 月足ライン表示設定(色、線幅)
- INTRADAY LIQUIDITY
- 1H … 1時間足ライン表示設定(色、線幅)
- 4H … 4時間足ライン表示設定(色、線幅)
- PURGED LIQUIDITY … 一度到達したラインの表示設定
- Show Purge Daily … 日足ライン表示/非表示設定
- Show Purge Weekly … 週足ライン表示/非表示設定
- Show Purge Monthly … 月足ライン表示/非表示設定
- Show Purge 1H … 1時間足ライン表示/非表示設定
- Show Purge 4H … 4時間足ライン表示/非表示設定
- MARKET STRUCTURE BREAK - MBS
- Loopback … High/Lowを探索する期間
- DISPLACEMENT FOR FVG
- Require FVG … FVG発生時のみ描画する
- Displacement Type … openからcloseまでの変位か?highからlowまでの変位か?
- Displacement Length … 標準偏差を計算する期間
- Displacement Strength … 変位の強さ(数字が大きいほど強い変位を検出)
FVG Breakaway/3rd Candle (Arjo) [MK]Simple script to identify FVGs (Fair Value Gaps) on the current chart timeframe. The script differs from other FVG indicators on the Tradingview platform by using Arjos 3rd candle rule to identify which gaps are 'Breakway Gaps' and which Gaps are likely to be returned to.
NOTE: As with all 'trading rules' this theory is not 100% accurate.
default settings:
Breakaway Gaps = YELLOW
Gaps that price may return to = GREEN
Mitigated Gaps = 100% TRANSPARENT
What is a FVG:
A FVG is a price area defined by a 3 candle pattern. For a bullish FVG, the low of the 3rd candle must be higher than the high of the 1st candle. This then leaves an area that is drawn as in the example below:
A bearish FVG is defined by the high of the 3rd candle being lower than the low of the 1st candle, as shown in the example below:
FVGs can act like magnets where price will either retrace to or reach for, therefore they can be used as entry points and also for take profit target levels.
If for example, a trader would like to use an FVG for an entry, it would be useful to know which FVGs are more likely for price to re-enter and which FVG will be left un-touched. FVGs that are likely to be left un-touched by price are called 'Breakaway Gaps'.
How do we define a 'Breakaway Gap':
First we identify FVGs using the rules stated above, then we look to see where the 3rd candle closed in relation to the 2nd candle. For a bullish 'Breakaway Gap' we want to see the 3rd candle close above the high of the 2nd candle. An example of a bullish Breakaway Gap is shown in the example below:
A bearish 'Breakaway Gap' is defined by the close of the 3rd candle being lower than the low of the 2nd candle. An example is shown below:
How do we define an FVG that price may return to:
Any gap that does not meet the above rules for a 'Breakway Gap' is therefore considered an FVG that price may return to. So for a bullish FVG that price may return to we would look to see if the close of the 3rd candle is above the high of the 2nd candle. If it is not above the high of the 2nd candle then it more likely that price will retrace into the FVG before continuing higher. An example is shown below:
A bearish gap that price may return to is defined by the close of the 3rd candle not being lower than the low of the 2nd candle. An example is shown below:
The indicator is based on the teachings of 'Arjo'. Note: breakaway gaps will only remain 'breakaway' until a liquidity level is reached. Breakaways therefore do not remain 'breakaway' forever. Users of the indicators must fully comprehend this theory before using the indicator with live markets.
Users of the script should be fully aware of this concept and also have conducted thorough backtesting using a large data set before using this indicator with live accounts.
lib_fvgLibrary "lib_fvg"
further expansion of my object oriented library toolkit. This lib detects Fair Value Gaps and returns them as objects.
Drawing them is a separate step so the lib can be used with securities. It also allows for usage of current/close price to detect fill/invalidation of a gap and to adjust the fill level dynamically. FVGs can be detected while forming and extended indefinitely while they're unfilled.
method draw(this)
Namespace types: FVG
Parameters:
this (FVG)
method draw(fvgs)
Namespace types: FVG
Parameters:
fvgs (FVG )
is_fvg(mode, precondition, filter_insignificant, filter_insignificant_atr_factor, live)
Parameters:
mode (int) : switch for detection 1 for bullish FVGs, -1 for bearish FVGs
precondition (bool) : allows for other confluences to block/enable detection
filter_insignificant (bool) : allows to ignore small gaps
filter_insignificant_atr_factor (float) : allows to adjust how small (compared to a 50 period ATR)
live (bool) : allows to detect FVGs while the third bar is forming -> will cause repainting
Returns: a tuple of (bar_index of gap bar, gap top, gap bottom)
create_fvg(mode, idx, top, btm, filled_at_pc, config)
Parameters:
mode (int) : switch for detection 1 for bullish FVGs, -1 for bearish FVGs
idx (int) : the bar_index of the FVG gap bar
top (float) : the top level of the FVG
btm (float) : the bottom level of the FVG
filled_at_pc (float) : the ratio (0-1) that the fill source needs to retrace into the gap to consider it filled/invalidated/ready for removal
config (FVGConfig) : the plot configuration/styles for the FVG
Returns: a new FVG object if there was a new FVG, else na
detect_fvg(mode, filled_at_pc, precondition, filter_insignificant, filter_insignificant_atr_factor, live, config)
Parameters:
mode (int) : switch for detection 1 for bullish FVGs, -1 for bearish FVGs
filled_at_pc (float)
precondition (bool) : allows for other confluences to block/enable detection
filter_insignificant (bool) : allows to ignore small gaps
filter_insignificant_atr_factor (float) : allows to adjust how small (compared to a 50 period ATR)
live (bool) : allows to detect FVGs while the third bar is forming -> will cause repainting
config (FVGConfig)
Returns: a new FVG object if there was a new FVG, else na
method update(this, fill_src)
Namespace types: FVG
Parameters:
this (FVG)
fill_src (float) : allows for usage of different fill source series, e.g. high for bearish FVGs, low vor bullish FVGs or close for both
method update(all, fill_src)
Namespace types: FVG
Parameters:
all (FVG )
fill_src (float)
method remove_filled(unfilled_fvgs)
Namespace types: FVG
Parameters:
unfilled_fvgs (FVG )
method delete(this)
Namespace types: FVG
Parameters:
this (FVG)
method delete_filled_fvgs_buffered(filled_fvgs, max_keep)
Namespace types: FVG
Parameters:
filled_fvgs (FVG )
max_keep (int) : the number of filled, latest FVGs to retain on the chart.
FVGConfig
Fields:
box_args (|robbatt/lib_plot_objects/36;BoxArgs|#OBJ)
line_args (|robbatt/lib_plot_objects/36;LineArgs|#OBJ)
box_show (series__bool)
line_show (series__bool)
keep_filled (series__bool)
extend (series__bool)
FVG
Fields:
config (|FVGConfig|#OBJ)
startbar (series__integer)
mode (series__integer)
top (series__float)
btm (series__float)
center (series__float)
size (series__float)
fill_size (series__float)
fill_lvl_target (series__float)
fill_lvl_current (series__float)
fillbar (series__integer)
filled (series__bool)
_fvg_box (|robbatt/lib_plot_objects/36;Box|#OBJ)
_fill_line (|robbatt/lib_plot_objects/36;Line|#OBJ)
Gaps + Imbalances + Wicks (MTF) - By LeviathanThis script will identify and draw price gaps, wicks and imbalances with customizable fill conditions, multi-timeframe function, zone size filtering, volume comparison, lookback filtering, as well as highly customizable appearance and settings.
I’ve made this indicator to combine the three similar but different elements that occur in price movements and serve as significant zones of interest or way of PA interpretation in various different strategies.
Imbalances (or Fair Value Gap/FVG/Inefficiency/whatever)
- The Imbalance “pattern” consists of 3 candles (1- candle before the sharp move, 2 - sharp move candle and 3- candle after the sharp move). When price makes a move downwards, the imbalance zone is defined as the area between the low of 1 and the high of 3 When price makes a move upwards, the imbalance zone is defined as the area between the high of 1 and the low of 3.
Gaps
A price gap is an area on a chart where no trading activity has taken place. A gap up means that the low of the current candle is higher than the high of the previous candle and a gap down means that the high of the current candle is lower than the low of the previous candle.
Wicks (or shadows/tails/whatever)
Wicks are used to indicate where the price has fluctuated relative to the opening and closing price of the candle. An upper wick is the zone between candle high and candle close/open (whichever is higher) and a lower wick is the zone between candle’s low and candle’s close/open (whichever is lower).
Settings Overview
“Zone Type” - This input lets you decide which zones should the script plot and on which timeframe. You should always pick a timeframe higher than your chat’s.
“Middle Line, Top Line, Bottom Line” - Show or hide the Middle Line (horizontal level in the middle of each zone), Show or hide Top Line (horizontal level at the top of the zone), Show or hide Bottom Line (horizontal level at the bottom of the zone)
“UP/DOWN Zones" - This input lets you show/hide UP Zones or DOWN Zones an pick their color, border color and label color.
”Fill Condition” - If turned ON, the zones will end drawing when your prefered Fill Condition is met (Full Filll = price mitigates the whole zone, Half Fill = zone is at least halfway mitigated and Touch = zone is touched by price). If turned OFF, the zones will only be plotted for the amount of bars defined it “Zone Length”.
”Lookback (D)” - This input lets you limit the amount of zones plotted on the chart by choosing how many days back in time should the script go to find and plot zones. For example, input 1 will only show you the zones of the past day, input 7 will only show you the zones of the past week.
”Hide Filled Zones” - If turned ON, the zones that have been filled will be removed from the chart.
”Show Boxes” - Show or hide the boxes that represent the zones. This is useful for those who want the zones to be visualized by just lines.
“Filter Type” - this input lets you create a filter that will make the script only show zones that are larger than ATR or larger than a certain percentage. You can choose the ATR Length and the multiplier (higher multiplier → larger zone required), as well as the Percentage (%) and its multiplier (higher percentage → larger zone required). If you choose “None”, the zones of all sizes will be plotted.
”Zone Labels” - this part of the settings lets you: show/hide labels, decide on the size of the labels and their positions, choose a custom name for each zone, choose the data that the labels present (Type of the zone/Timeframe/ Volume ).
”Other settings” - ‘Stop/Delete zone after X number of candles’ will force stop/delete the zone if it’s plotted for more than prefered number of bars. ‘Line Style’ lets you choose the style and the color of the lines, ‘Zone Length’ defines the length of the zone if Fill Condition is “None”.
More settings, modifications and improvements coming in future updates. This script is a bit old so I will clean up and optimize the code once I have more time.
Immediate Rebalance ICT [TradingFinder] No Imbalances - MTF Gaps🔵 Introduction
The concept of "Immediate Rebalance" in technical analysis is a powerful and advanced strategy within the ICT (Inner Circle Trader) framework, widely used to identify key market levels.
Unlike the "Fair Value Gap," which leaves a price gap requiring a retracement for a fill, an Immediate Rebalance fills the gap immediately, representing an instant balance that strengthens the prevailing market trend. This structure allows traders to quickly spot critical price zones, capitalizing on strong trend continuations without the need for price retracement.
The "Immediate Rebalance ICT" indicator leverages this concept, providing traders with automated identification of critical supply and demand zones, order blocks, liquidity voids, and key buy-side and sell-side liquidity levels.
Through features like crucial liquidity points and immediate rebalancing areas, this tool enables traders to perform precise real-time market analysis and seize profitable opportunities.
🔵 How to Use
The Immediate Rebalance indicator assists traders in identifying reliable trading signals by detecting and analyzing Immediate Rebalance zones. By focusing on supply and demand areas, the indicator pinpoints optimal entry and exit positions.
Here’s how to use the indicator in both bearish (Supply Immediate Rebalance) and bullish (Demand Immediate Rebalance) structures :
🟣 Bullish Structure (Demand Immediate Rebalance)
In a bullish scenario, the indicator detects a Demand Immediate Rebalance formed by two consecutive bullish candles with overlapping wicks. This structure signifies an immediate demand zone, where price instantly balances within the zone, reducing the likelihood of a revisit and indicating potential upside momentum.
Zone Identification : Look for two consecutive bullish candles with overlapping wicks, forming a demand zone. This structure, due to its rapid balance, usually does not require a revisit and supports further upward movement.
Entry and Exit Levels : If price revisits this zone, percentage markers, particularly 50% and 75%, act as supportive levels, creating ideal entry points for long positions.
Example : In the second image, an example of a Demand Immediate Rebalance is shown, where overlapping bullish candle shadows indicate immediate balance, supporting the continuation of the bullish trend.
🟣 Bearish Structure (Supply Immediate Rebalance)
In a bearish setup, the indicator identifies a Supply Immediate Rebalance when two consecutive bearish candles with overlapping wicks appear. This formation signals an immediate supply zone, suggesting a high probability of trend continuation to the downside, with minimal expectation for price to retrace back to this area.
Zone Identificatio n: Look for two consecutive bearish candles with overlapping shadows. This structure forms a supply area where price is expected to continue its downtrend without revisiting the zone.
Entry and Exit Level s: Should price revisit this zone, percentage-based levels (e.g., 50% and 75%) serve as potential resistance points, optimizing entry for short positions, especially if the downtrend is expected to persist.
Example : The attached chart illustrates a Supply Immediate Rebalance, where overlapping candle shadows define this area, reassuring traders of a continued downward trend with a low likelihood of price returning to this zone.
🔵 Settings
ImmR Filter : This filter allows users to adjust the detection of Immediate Rebalance zones in four modes, from "Very Aggressive" to "Very Defensive," based on zone width. The chosen mode controls the sensitivity of Immediate Rebalance detection, allowing users to fine-tune the indicator to their trading style.
Multi Time Frame : Enabling this option allows users to set the indicator to a specific timeframe (1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, daily, weekly, or monthly), broadening the perspective for identifying Immediate Rebalance zones across multiple timeframes.
🔵 Conclusion
The Immediate Rebalance indicator, based on rapid balancing zones within supply and demand areas, serves as a powerful tool for market analysis and improving trade decision-making.
By accurately identifying zones where price achieves instant balance without gaps, the indicator highlights areas likely to support strong trend continuations, exempt from common retracements.
The indicator’s use of percentage levels enables traders to pinpoint optimal entry and exit points more effectively, with levels like 50% and 75% acting as support within demand zones and resistance within supply zones. This empowers traders to ride strong trends without the worry of abrupt reversals.
Overall, the Immediate Rebalance is a reliable tool for both professional and beginner traders seeking precise methods to recognize supply and demand zones, capitalizing on consistent trends.
By choosing appropriate settings and focusing on the zones highlighted by this indicator, traders can enter trades with greater confidence and improve their risk management.
Three Bar Gap (Simple Price Action - with 1 line plot)This script is tailored towards experienced traders who prefer to view raw price charts during live execution. It searches for a three-bar pattern of what is colloquially called "fair value gap", or "imbalance" and uses a single line to plot the results. The goal is to display price in a way that is as simple as possible so that chart readers who don't prefer to add indicators on their screen will still find this indicator as an acceptable option to consider for.
From a code perspective, this script explores a new PineScript feature called UDT (user-defined types). This is an incredible update because it brings developers one step close to having the ability to create abstract data types.
█ What is price action?
Experienced traders will tell you that the chart that they use for live execution is raw, clean, and uses no indicators. They say they execute on price action, so what exactly is price action?
There is no formal definition to it, but one can agree that it implies the process of analyzing price without considering the fundamentals, without needing to know what the news was about, and without needing to know any of the Greeks (except for the desire to “seek alpha” Ha.haa...). This is not to say that price action traders are executing in their own vacuums without the need to know what is happening around the world. Surely fundamentals and financial models can be used beforehand for developing a bias for what is being traded, but it’s price-first at the moment of execution. That said, Factor (A) is Price.
Factor (B) is time-perception, it’s how the trader reads the tape. How the trader perceives price to change with respect to time is valuable information. Interpretation of "time" will be elaborated in the next section that talks about candlestick patterns detected by this script.
Putting this together, price action means the analysis of price movement by only considering (A) price, and (B) time, to predict which direction the market will move. A speculative trader is timing the market with the expectation to make a quick in-and-out profit; she/she is using price action. On the other hand, a long term investor holding a diversified portfolio with a strategy based on modern portfolio theory combined with fundamental analysis (at this point candlesticks are irrelevant) but has one additional criteria of, say, can only go Long on a stock when it has closed Green on Daily; he/she is also considered to be executing on price action.
█ Candlestick patterns
This script calculates the displacement of highs and lows over three consecutive bars.
A) Down move = When High of the recent confirmed bar is lower than the Low of the previous-previous candle
B) Up move = When Low of the recent confirmed bar is higher than the High of the previous-previous candle
(Note that its the confirmed bar that is being talked about, so it does not repaint)
An ATR filter will be applied to reduce the number of lines generated as many times they might just be associated with minor price changes.
Interpretations:
When price moves quickly across three bars, it can be thought that it has gapped. Although the candle in the middle appears to be solid, it’s not from a conceptual perspective. This is because time itself is arbitrary; timeframes don’t necessarily have to be fixed intervals. Take stocks with regular trading hours for example, if price makes a breakaway gap and you bundle the after-hours and pre-market sessions together as one candle, never minding that intervals should be fixed, then you will see the exact three-bar-gap patterns. Similar happens during intraday sessions on lower timeframes, if you zoom-in closer, you’ll see that ticks within the middle candle are sparsely dispersed. This is why it's called a gap.
█ Parameters with fixed inputs & assumptions used:
ATR is used for filtering out minor movements that will likely be deemed as irrelevant by trader for the purpose of live execution. The following inputs are required:
A) ATR lookback period
B) Multiplier
The product of ATR(len=A) and B produces a threshold for minimum distance that price must gap by. Initially, it was proposed to be only based on one ATR, but often an ATR is too wide and using it will filter out too many lines. Because of this observation, a multiplier (Parameter B) has been introduced to allow users to apply fractional ATR as a threshold.
█ Applications:
For trend followers: Follow the direction of the gap. Entering above recent high/low points above/below the first impulse with a stop-limit order is a viable tactic.
For contrarians fading a trend: The mid-point is a good point of reference for predicting potential areas of support/resistance.
Price SandwichFor the script in question
This script acts as an indicator that a potential short term or long term trend reversal is coming. Note that not every candle can be used as an indication and the smaller ones tend to have little to no effect, however they can be used alongside orderblocks or future support/resistance areas.
The best timeframes I've found these to be useable are on the 1m, 2m, or second charts.
You may use this as an added confluence that a trend is ending either short term or long term.
You may also decide to use this with other indicators to build further confluence.
Note that this is just something I've noticed personally most likely does not apply to all trend reversals.
Some ideas on how to use it:
If you extend a rectangle out from the block itself, you can often find the next high or low overlaps with said rectangle.
They may also overlap with a fair value gap that could make that gap have more potential.
Hope this is of use and can help with that added confluence or early warning signal of a potential reversal. This should not be used alone and it's recommended to not use this as a surefire indication of whether to take a trade.//Krindler
Script Breakdown
//@version=5 // this makes the script v5 friendly
indicator("Price Sandwich", overlay=true) //makes this script an indicator, overlay=true to make it a part of the main chart
// User input for the highlight color
userColor = input(color.green, title="Highlight Color") //This allows you to choose what color you want the candle to be in the settings
//Function to check the custom candle pattern based on whether the candle is being englulfed by both preceding and latter candle.
isCustomPattern() => //let's me look for a custom candle pattern
high > high and high < high and low < low and low > low
//this checks the candle before and the candle after to check that the candle in the middle doesn't escape the range of the candle before, or the candle afters highs and lows thus making it a sandwiched candle.
//high > high and high < high and low < low and low > low basically says: candle 1 high must be greater than candle 2 high and candle 2 high must be less than candle 3 high and candle 1 low must be less than candle 2 low and candle 2 low must be greater than candle 3 low. Thus making sure that candle 2 is within the range of candle's 1 and 3 and doesn't have a high or low that is either above or below candle 1 and 3. 'and' is the operator to make sure that all of these values must be true in order for that candle to meet the criteria of getting colored.
// Apply bar color to Sandwiched candle if candle is found.
barcolor(isCustomPattern() ? userColor : na, offset=-1) //this targets the findings from isCustomPattern() and uses the user color chosen in settings and colors the middle bar by using offset=-1, otherwise it would color candle 3, so offset goes back 1 candle to color the middle candle.
If this script is already in circulation, please let me know and i'll remove it immediately. I checked but couldn't find one that did it.
FVG w/ Fibs [QuantVue]The "FVG w/ Fibs" indicator is a trading tool designed to identify and visualize Fair Value Gaps (FVGs) while overlaying two Fibonacci retracement levels.
• Bullish FVG: Occurs when the low of the current bar is higher than the high of two bars ago, and the previous close is higher than the high of two bars ago.
• Bearish FVG: Occurs when the high of the current bar is lower than the low of two bars ago, and the previous close is lower than the low of two bars ago.
The indicator filters these gaps based on user-defined criteria such as the minimum percentage size of the gap.
Once identified, these FVGs are highlighted on the chart using customizable boxes and the 50% and 61.8% (default settings) Fibonacci retracement levels are calculated and drawn based on the size of the identified FVG.
• Dynamically updates and extends the boxes as the price evolves.
• Alerts / visual changes for FVGs that get filled.
• User option for fills by Wicks or Close
• User-customizable settings for box colors, styles, and Fibonacci level appearances
Give this indicator a BOOST and COMMENT your thoughts!
We hope you enjoy.
Cheers!
Dabel MS + FVGThis script is designed to assist traders by identifying market structures, imbalances, and potential trade opportunities using Break of Structure (BOS) and Market Structure Shifts (MSS). It visually highlights imbalances in price action, key pivots, and market structure changes, providing actionable information for making trading decisions.
Key features:
Imbalances Detection: Highlights bullish and bearish price gaps (Fair Value Gaps) using colored boxes. Users can choose the line style (solid, dashed, or dotted) for imbalance midlines.
Market Structure Analysis: Tracks pivot highs and lows to identify BOS and MSS in two separate market structures with adjustable pivot strengths.
Customizable Visualization: Allows users to choose line styles, colors, and display options for both imbalances and market structures.
Alerts: Alerts traders when BOS or MSS occur, helping to monitor the market effectively.
Trading Strategy
Imbalance Trading:
Imbalances (gaps) represent areas where supply or demand was left unfilled. These gaps often act as magnet zones where the price revisits to fill.
Bullish Imbalance: Look for buying opportunities when price enters a green imbalance zone.
Bearish Imbalance: Look for selling opportunities when price enters a red imbalance zone.
Use the midline of the imbalance box as a key reference point for potential reversals.
Break of Structure (BOS) and Market Structure Shift (MSS):
BOS: Indicates a continuation of the existing trend. For example:
Bullish BOS: Look for continuation in the uptrend after a high is broken.
Bearish BOS: Look for continuation in the downtrend after a low is broken.
MSS: Suggests a potential reversal in market structure. For example:
Bullish MSS: Indicates a possible shift from a bearish to bullish market.
Bearish MSS: Indicates a potential shift from a bullish to bearish market.
Multiple Market Structures:
This script provide two sets of market structures, allowing traders to compare short-term and long-term trends.
Adjust the pivot strength to suit your trading style (lower for intraday trading, higher for swing or positional trading).
Entry and Exit:
Entry: Look for entries near imbalances or after confirmed BOS/MSS in line with the overall trend.
Exit: Place stop-loss below/above recent pivots and take profit at nearby support/resistance or imbalance zones.
For New Traders
Focus on Basics: Understand what BOS and MSS mean and how they signal trend direction or reversals.
Use Alerts: Rely on the script's alert system to catch important moments without staring at charts all day.
Start Small: Test this strategy on a demo account before using it live. You can understand it more with practice.
Multi-Timeframe FVG [TFO]The goal of this indicator is to find Fair Value Gaps (FVGs) that overlap on multiple timeframes. FVGs are already meant to be “sensitive” areas where one might expect price to react from, therefore FVGs that overlap on multiple timeframes could provide even more confluence that there may be a reaction in said area (with proper context).
Mitigation Type allows users to select how FVGs should be mitigated, either by wick or by completely closing through the area.
The displacement option helps to filter out smaller FVGs by looking for areas where price ran rather quickly (causing displacement). This is done by comparing the candle that made the FVG to a fractional ATR value, so that one may fine-tune how much “larger” the candle range needs to be, relative to recent price action.
The timeframe alignment option allows users to select how many timeframes must be converging in order to draw FVGs. For instance, with all timeframes selected, a timeframe alignment value of 2 would require that there be overlapping FVGs on 2 or more timeframes. A value of 3 would require that there be overlapping FVGs on all 3 timeframes in order for them to be drawn.
SCE Price Action SuiteThis is an indicator designed to use past market data to mark key price action levels as well as provide a different kind of insight. There are 8 different features in the script that users can turn on and off. This description will go in depth on all 8 with chart examples.
#1 Absorption Zones
I defined Absorption Zones as follows.
//----------------------------------------------
//---------------Absorption---------------------
//----------------------------------------------
box absorptionBox = na
absorptionBar = ta.highest(bodySize, absorptionLkb)
bsab = ta.barssince(bool(ta.change(absorptionBar)))
if bsab == 0 and upBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(0, 80, 75), border_width = boxLineSize, bgcolor = color.rgb(0, 80, 75))
absorptionBox
else if bsab == 0 and downBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = color.rgb(105, 15, 15))
absorptionBox
What this means is that absorption bars are defined as the bars with the largest bodies over a selected lookback period. Those large bodies represent areas where price may react. I was inspired by the concept of a Fair Value Gap for this concept. In that body price may enter to be a point of support or resistance, market participants get “absorbed” in the area so price can continue in whichever direction.
#2 Candle Wick Theory/Strategy
I defined Candle Wick Theory/Strategy as follows.
//----------------------------------------------
//---------------Candle Wick--------------------
//----------------------------------------------
highWick = upBar ? high - close : downBar ? high - open : na
lowWick = upBar ? open - low : downBar ? close - low : na
upWick = upBar ? close + highWick : downBar ? open + highWick : na
downWick = upBar ? open - lowWick : downBar ? close - lowWick : na
downDelivery = upBar and downBar and high > upWick and highWick > lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
upDelivery = downBar and upBar and low < downWick and highWick < lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
line lG = na
line lE = na
line lR = na
bodyMidpoint = math.abs(body) / 2
upWickMidpoint = math.abs(upWickSize) / 2
downWickkMidpoint = math.abs(downWickSize) / 2
if upDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, downWickkMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, downWickkMidpoint)
cpG = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 + tp))
cpR = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 - sl))
cpG1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 + tp))
cpR1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 - sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
else if downDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, upWickMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, upWickMidpoint)
cpG = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 - tp))
cpR = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 + sl))
cpG1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 - tp))
cpR1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 + sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
First I get the size of the wicks for the top and bottoms of the candles. This depends on if the bar is red or green. If the bar is green the wick is the high minus the close, if red the high minus the open, and so on. Next, the script defines the upper and lower bounds of the wicks for further comparison. If the candle is green, it's the open price minus the bottom wick. If the candle is red, it's the close price minus the bottom wick, and so on. Next we have the condition for when this strategy is present.
Down delivery:
Occurs when the previous candle is green, the current candle is red, and:
The high of the current candle is above the upper wick of the previous candle.
The size of the current candle's top wick is greater than its bottom wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed (barstate.isconfirmed).
The session is during market hours (session.ismarket).
Up delivery:
Occurs when the previous candle is red, the current candle is green, and:
The low of the current candle is below the lower wick of the previous candle.
The size of the current candle's bottom wick is greater than its top wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed.
The session is during market hours
Then risk is plotted from the percentage that users can input from an ideal entry spot.
#3 Candle Size Theory
I defined Candle Size Theory as follows.
//----------------------------------------------
//---------------Candle displacement------------
//----------------------------------------------
line lECD = na
notableDown = bodySize > bodySize * candle_size_sensitivity and downBar and session.ismarket and barstate.isconfirmed
notableUp = bodySize > bodySize * candle_size_sensitivity and upBar and session.ismarket and barstate.isconfirmed
if notableUp and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(0, 80, 75), line.style_solid, 3)
lECD
else if notableDown and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(105, 15, 15), line.style_solid, 3)
lECD
This plots candles that are “notable” or out of the ordinary. Candles that are larger than the last by a value users get to specify. These candles' highs or lows, if they are green or red, act as levels for support or resistance.
#4 Candle Structure Theory
I defined Candle Structure Theory as follows.
//----------------------------------------------
//---------------Structure----------------------
//----------------------------------------------
breakDownStructure = low < low and low < low and high > high and upBar and downBar and upBar and downBar and session.ismarket and barstate.isconfirmed
breakUpStructure = low > low and low > low and high < high and downBar and upBar and downBar and upBar and session.ismarket and barstate.isconfirmed
if breakUpStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.teal, line.style_solid, 3)
lE
else if breakDownStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, open)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, open)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.red, line.style_solid, 3)
lE
It is a series of candles to create a notable event. 2 lower lows in a row, a lower high, then green bar, red bar, green bar is a structure for a breakdown. 2 higher lows in a row, a higher high, red bar, green bar, red bar for a break up.
#5 Candle Swing Structure Theory
I defined Candle Swing Structure Theory as follows.
//----------------------------------------------
//---------------Swing Structure----------------
//----------------------------------------------
line htb = na
line ltb = na
if totalSize * swing_struct_sense < totalSize and upBar and downBar and high > high and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, high)
cpE = chart.point.new(time, bar_index + bl_strcuture, high)
htb := line.new(cpS, cpE, xloc.bar_index, color = color.red, style = line.style_dashed)
htb
else if totalSize * swing_struct_sense < totalSize and downBar and upBar and low > low and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, low)
cpE = chart.point.new(time, bar_index + bl_strcuture, low)
ltb := line.new(cpS, cpE, xloc.bar_index, color = color.teal, style = line.style_dashed)
ltb
A bearish swing structure is defined as the last candle’s total size, times a scalar that the user can input, is less than the current candles. Like a size imbalance. The last bar must be green and this one red. The last high should also be less than this high. For a bullish swing structure the same size imbalance must be present, but we need a red bar then a green bar, and the last low higher than the current low.
#6 Fractal Boxes
I define the Fractal Boxes as follows
//----------------------------------------------
//---------------Fractal Boxes------------------
//----------------------------------------------
box b = na
int indexx = na
if bar_index % (n * 2) == 0 and session.ismarket and showBoxes
b := box.new(left = bar_index, top = topBox, right = bar_index + n, bottom = bottomBox, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = na)
indexx := bar_index + 1
indexx
The idea of this strategy is that the market is fractal. It is considered impossible to be able to tell apart two different time frames from just the chart. So inside the chart there are many many breakouts and breakdowns happening as price bounces around. The boxes are there to give you the view from your timeframe if the market is in a range from a time frame that would be higher than it. Like if we are inside what a larger time frame candle’s range. If we break out or down from this, we might be able to trade it. Users can specify a lookback period and the box is that period’s, as an interval, high and low. I say as an interval because it is plotted every n * 2 bars. So we get a box, price moves, then a new box.
#7 Potential Move Width
I define the Potential Move Width as follows
//----------------------------------------------
//---------------Move width---------------------
//----------------------------------------------
velocity = V(n)
line lC = na
line l = na
line l2 = na
line l3 = na
line l4 = na
line l5 = na
line l6 = na
line l7 = na
line l8 = na
line lGFractal = na
line lRFractal = na
cp2 = chart.point.new(time, bar_index + n, close + velocity)
cp3 = chart.point.new(time, bar_index + n, close - velocity)
cp4 = chart.point.new(time, bar_index + n, close + velocity * 5)
cp5 = chart.point.new(time, bar_index + n, close - velocity * 5)
cp6 = chart.point.new(time, bar_index + n, close + velocity * 10)
cp7 = chart.point.new(time, bar_index + n, close - velocity * 10)
cp8 = chart.point.new(time, bar_index + n, close + velocity * 15)
cp9 = chart.point.new(time, bar_index + n, close - velocity * 15)
cpG = chart.point.new(time, bar_index + n, close + R)
cpR = chart.point.new(time, bar_index + n, close - R)
if ((bar_index + n) * 2 - bar_index) % n == 0 and session.ismarket and barstate.isconfirmed and showPredictionWidtn
cp = chart.point.new(time, bar_index, close)
cpG1 = chart.point.new(time, bar_index, close + R)
cpR1 = chart.point.new(time, bar_index, close - R)
l := line.new(cp, cp2, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l2 := line.new(cp, cp3, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l3 := line.new(cp, cp4, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l4 := line.new(cp, cp5, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l5 := line.new(cp, cp6, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l6 := line.new(cp, cp7, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l7 := line.new(cp, cp8, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8 := line.new(cp, cp9, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8
By using the past n bar’s velocity, or directional speed, every n * 2 bars. I can use it to scale the close value and get an estimate for how wide the next moves might be.
#8 Linear regression
//----------------------------------------------
//---------------Linear Regression--------------
//----------------------------------------------
lr = showLR ? ta.linreg(close, n, 0) : na
plot(lr, 'Linear Regression', color.blue)
I used TradingView’s built in linear regression to not reinvent the wheel. This is present to see past market strength of weakness from a different perspective.
User input
Users can control a lot about this script. For the strategy based plots you can enter what you want the risk to be in percentages. So the default 0.01 is 1%. You can also control how far forward the line goes.
Look back at where it is needed as well as line width for the Fractal Boxes are controllable. Also users can check on and off what they would like to see on the charts.
No indicator is 100% reliable, do not follow this one blindly. I encourage traders to make their own decisions and not trade solely based on technical indicators. I encourage constructive criticism in the comments below. Thank you.
SMC Structures and FVGThe SMC Structures and FVG indicator allows the user to easily identify trend continuations (Break Of Structure) or trend changes (CHange Of CHaracter) on any time frame. In addition, it display all FVG areas, whether they are bullish, bearish, or even mitigated.
Fair Value Gap :
The FVG process shows every bullish, bearish or even mitigated FVG liquidity area. When a FVG is fully mitigated it will directly be removed of the chart.
There is an history of FVG to show. By selecting specific number of FVG to show in the chart, the user can focus its analysis on lasts liquidity area.
Here's the rules for FVG color :
Green when it's a bullish FVG and has not been mitigated
Red when it's a bearish FVG and has not been mitigated
Gray when the bullish / bearish FVG has been mitigated
Removed when the FVG has been fully mitigated
Structures analysis:
The Structure process show BOS in grey lines and CHoCH in yellow lines. It shows to the user the lasts price action pattern.
The blue lines are the high value and the low value of the current structure.
Inversion GapsAn inverted fair value gap (FVG) occurs when candles start closing below a bullish FVG or above a bearish FVG and in this case, support FVGs become resistances and vice versa. This is a smart money concept introduced by ICT. While we a number of have indicators for FVGs, we don't have any for inversion FVGs. This indicator is just for that - it shows FVGs only after they're inverted.
The meat of it comes from being able to plot HTF inverted FVGs in LTF. In the above BTC chart, you can see M15 inverted FVGs plotted on M1 chart and you can see price respecting them. Mitigations can also be shown as lines (as you can see in the chart).
You can also setup alerts for formation and mitigation of such inversion FVGs.
FVG Channel [LuxAlgo]The FVG Channel indicator displays a channel constructed from the averages of unmitigated historical fair value gaps (FVG), allowing to identify trends and potential reversals in the market.
Users can control the amount of FVGs to consider for the calculation of the channels, as well as their degree of smoothness through user settings.
🔶 USAGE
The FVG Channel is constructed by averaging together recent unmitigated Bullish FVGs (contributing to the creation of the upper bands), and Bearish unmitigated FVGs (contributing to the creation of the lower bands) within a lookback determined by the user. A higher lookback will return longer-term indications from the indicator.
The channel includes 5 bands, with one upper and one lower outer extremities, as well as an inner series of values determined using the Fibonacci ratios (respectively 0.786, 0.5, 0.236) from the channel's outer extremities.
An uptrend can be identified by price holding above the inner upper band (obtained from the 0.786 ratio), this band can also provide occasional support when the price retraces to it while in an uptrend.
Breaking below the inner upper band with an unwillingness to reach above again is a clear sign of hesitation in the market and can be indicative of an upcoming consolidation or reversal.
This can directly be applied to downtrends as well, below are examples displaying both scenarios.
Uptrend Example:
Downtrend Example:
🔹 Breakout Levels
When the price mitigates all FVGs in a single direction except for 1, the indicator will display a "Breakout Level". This is the level that price will need to cross in order for all FVGs in that direction to be mitigated, because of this they can also be aptly called "Last Stand Levels".
These levels can be considered as potential support and resistance levels, however, should always be monitored for breakouts since a substantial push above or below these points would indicate strong momentum.
🔹 Signals
The indicator includes Bullish and Bearish Signals, these signals fire when all FVGs for a single direction have been mitigated and an engulfing candle occurs in the opposite direction. These are reversal signals and should be used alongside other indicators to appropriately manage risk.
Note: When all FVGs in a single direction have been mitigated, the candles will change colors accordingly.
🔶 DETAILS
The script uses a typical identification method for FVGs. Once identified, the script collects and stores the mitigation levels of the respective bullish and bearish FVGs:
For Bullish FVGs this is the bottom of the FVG.
For Bearish FVGs this is the top of the FVG.
The data is managed to only consider a specific amount of FVG mitigation levels, determined by the set "Unmitigated FVG Lookback". If an FVG is mitigated, it frees up a spot in the memory for a new FVG, however, if the memory is full, the oldest will be deleted.
The averages displayed (Channel Upper and Lower) are created from 2 calculation steps, the first step involves taking the raw average of the FVG mitigation levels, and the second step applies a simple moving average (SMA) smoothing of the precedent obtained averages.
Note: To view the mitigation levels average obtained in the first step, the "Smoothing Length" can be set to 1.
🔶 SETTINGS
Unmitigated FVG Lookback: Sets the maximum number of Unmitigated FVG mitigation levels that the script will use to calculate the channel.
Smoothing Length: Sets the smoothing length for the channel to reduce noise from the raw data.
Mark FVGsMark FVGs is marking FVG (stands for Fair Value Gap, other name is Imbalance or IMB) on your chart so that you can instantly detect them
It supports:
- marking bullish and bearish partly filled or unfilled FVGs of the current timeframe
- marking bullish and bearish already filled FVGs of the current timeframe
- marking bullish and bearish FVGs of the any 4 timeframes on your current timeframe
technically it re-builds them on the last bar or as soon as new realtime bar is updated. it looks with 1k bars back to find the nearest specific number of FGVs
Adjustments:
- changing the maximum number of FVGs to display.
- changing the color of FVG area
- displaying already filled FVG of the current time frame
- changing the mode of displaying area it can either extended or fixed width
- displaying labels of other time frame FVGs
MTF fair value gap v2 thigh gaps yumwell load in 2 FVG indicators one for current chart then one for MTF of interest.
Higher timeframe FVGs are more important and can be used for bias or even targets for internal liquidity.
big thanks @shanxia for basically re-doing the FVGs into arrays hehehe..
Can now delete mitigated or change mitigated color..
I dont know who uses extensions but if you want to suffer in your private time then go ahead...
pre sure this is the sexiest FVG indicator validate me in the description pls